using System;
using System.Collections.Generic;
using System.Text;

namespace TileGert
{
  /// <summary>
  /// Determines the visible area that is displayed on the screen.
  /// It is automatically created for the game when it is initialized.
  /// </summary>
  public class GertViewport
  {
    private int _left = 0;
    private int _top = 0;
    private int _width = 0;
    private int _height = 0;

    /// <summary>
    /// Create a new viewport for the game.
    /// </summary>
    public GertViewport()
    {
    }

    /// <summary>
    /// Create a new viewport for the game and initializes it's properties with the given values.
    /// </summary>
    /// <param name="left">The pixel based x coordinate of the top left corner.</param>
    /// <param name="top">The pixel based y coordinate of the top left corner.</param>
    /// <param name="width">The width of the viewport in pixels.</param>
    /// <param name="height">The height of the viewport in pixels.</param>
    public GertViewport(int left, int top, int width, int height)
    {
      _left = left;
      _top = top;
      _width = width;
      _height = height;
    }

    /// <summary>
    /// Gets or sets the world space x coordinate of the left side of the viewport.
    /// </summary>
    public int Left
    {
      get { return _left; }
      set { _left = value; }
    }

    /// <summary>
    /// Gets or sets the world space y coordinate of the top side of the viewport.
    /// </summary>
    public int Top
    {
      get { return _top; }
      set { _top = value; }
    }

    /// <summary>
    /// Gets or sets the width in pixels of the viewport.
    /// </summary>
    public int Width
    {
      get { return _width; }
      set { _width = value; }
    }

    /// <summary>
    /// Gets or sets the height in pixels of the viewport.
    /// </summary>
    public int Height
    {
      get { return _height; }
      set { _height = value; }
    }

  }
}
